/*
 * XML Type:  RecurringInterSyncResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.RecurringInterSyncResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML RecurringInterSyncResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class RecurringInterSyncResponseImpl extends net.ofx.types.x2003.x04.impl.AbstractSyncResponseImpl implements net.ofx.types.x2003.x04.RecurringInterSyncResponse
{
    
    public RecurringInterSyncResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKACCTFROM$0 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName CCACCTFROM$2 = 
        new javax.xml.namespace.QName("", "CCACCTFROM");
    private static final javax.xml.namespace.QName RECINTERTRNRS$4 = 
        new javax.xml.namespace.QName("", "RECINTERTRNRS");
    
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "BANKACCTFROM" element
     */
    public boolean isSetBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BANKACCTFROM$0) != 0;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Unsets the "BANKACCTFROM" element
     */
    public void unsetBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BANKACCTFROM$0, 0);
        }
    }
    
    /**
     * Gets the "CCACCTFROM" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount getCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTFROM$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "CCACCTFROM" element
     */
    public boolean isSetCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCACCTFROM$2) != 0;
        }
    }
    
    /**
     * Sets the "CCACCTFROM" element
     */
    public void setCCACCTFROM(net.ofx.types.x2003.x04.CreditCardAccount ccacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTFROM$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTFROM$2);
            }
            target.set(ccacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "CCACCTFROM" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount addNewCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTFROM$2);
            return target;
        }
    }
    
    /**
     * Unsets the "CCACCTFROM" element
     */
    public void unsetCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCACCTFROM$2, 0);
        }
    }
    
    /**
     * Gets array of all "RECINTERTRNRS" elements
     */
    public net.ofx.types.x2003.x04.RecurringInterTransactionResponse[] getRECINTERTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(RECINTERTRNRS$4, targetList);
            net.ofx.types.x2003.x04.RecurringInterTransactionResponse[] result = new net.ofx.types.x2003.x04.RecurringInterTransactionResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "RECINTERTRNRS" element
     */
    public net.ofx.types.x2003.x04.RecurringInterTransactionResponse getRECINTERTRNRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInterTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.RecurringInterTransactionResponse)get_store().find_element_user(RECINTERTRNRS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "RECINTERTRNRS" element
     */
    public int sizeOfRECINTERTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RECINTERTRNRS$4);
        }
    }
    
    /**
     * Sets array of all "RECINTERTRNRS" element
     */
    public void setRECINTERTRNRSArray(net.ofx.types.x2003.x04.RecurringInterTransactionResponse[] recintertrnrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(recintertrnrsArray, RECINTERTRNRS$4);
        }
    }
    
    /**
     * Sets ith "RECINTERTRNRS" element
     */
    public void setRECINTERTRNRSArray(int i, net.ofx.types.x2003.x04.RecurringInterTransactionResponse recintertrnrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInterTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.RecurringInterTransactionResponse)get_store().find_element_user(RECINTERTRNRS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(recintertrnrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "RECINTERTRNRS" element
     */
    public net.ofx.types.x2003.x04.RecurringInterTransactionResponse insertNewRECINTERTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInterTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.RecurringInterTransactionResponse)get_store().insert_element_user(RECINTERTRNRS$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "RECINTERTRNRS" element
     */
    public net.ofx.types.x2003.x04.RecurringInterTransactionResponse addNewRECINTERTRNRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInterTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.RecurringInterTransactionResponse)get_store().add_element_user(RECINTERTRNRS$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "RECINTERTRNRS" element
     */
    public void removeRECINTERTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RECINTERTRNRS$4, i);
        }
    }
}
